package com.betfair.wrapper.types;

import com.betfair.www.publicapi.types.global.v3.MarketSummary;
import com.betfair.www.publicapi.types.global.v3.MarketTypeEnum;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * Created with IntelliJ IDEA.
 * User: markwilliams
 * Date: 10/19/13
 * Time: 12:39 PM
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "MarketSummary", uniqueConstraints = {
        @UniqueConstraint(columnNames = "iMarketId")})
public class MarketSummaryWrap {
    int _id;
    MarketSummary _marketSummary = new MarketSummary();
    Event _event = null;

    public MarketSummaryWrap() {
    }

    public MarketSummaryWrap(MarketSummary marketSummary) {
        this._marketSummary = marketSummary;
    }

    @Id
    @GeneratedValue(generator = "increment")
    @GenericGenerator(name = "increment", strategy = "increment")
    @Column(name = "iMarketId")
    public int getId() {
        return _id;
    }

    public void setId(int id) {
        this._id = id;
    }

    public int getEventTypeId() {
        return _marketSummary.getEventTypeId();
    }

    public void setEventTypeId(int param) {
        _marketSummary.setEventTypeId(param);
    }

    public int getMarketId() {
        return _marketSummary.getMarketId();
    }

    public void setMarketId(int param) {
        _marketSummary.setMarketId(param);
    }

    public String getMarketName() {
        return _marketSummary.getMarketName();
    }

    public void setMarketName(String param) {
        _marketSummary.setMarketName(param);
    }

    public String getMarketType() {
        return _marketSummary.getMarketType().toString();
    }

    public void setMarketType(String param) {
        _marketSummary.setMarketType(MarketTypeEnum.Factory.fromValue(param));
    }

    public int getMenuLevel() {
        return _marketSummary.getMenuLevel();
    }

    public void setMenuLevel(int param) {
        _marketSummary.setMenuLevel(param);
    }

    public int getOrderIndex() {
        return _marketSummary.getOrderIndex();
    }

    public void setOrderIndex(int param) {
        _marketSummary.setOrderIndex(param);
    }

    public String getTimezone() {
        return _marketSummary.getTimezone();
    }

    public void setTimezone(String param) {
        _marketSummary.setTimezone(param);
    }

    public String getVenue() {
        return _marketSummary.getVenue();
    }

    public void setVenue(String param) {
        _marketSummary.setVenue(param);
    }

    public int getBetDelay() {
        return _marketSummary.getBetDelay();
    }

    public void setBetDelay(int param) {
        _marketSummary.setBetDelay(param);
    }

    public int getNumberOfWinners() {
        return _marketSummary.getNumberOfWinners();
    }

    public void setNumberOfWinners(int param) {
        _marketSummary.setNumberOfWinners(param);
    }

    public int getEventParentId() {
        return _marketSummary.getEventParentId();
    }

    public void setEventParentId(int param) {
        _marketSummary.setEventParentId(param);
    }

    public int getExchangeId() {
        return _marketSummary.getExchangeId();
    }

    public void setExchangeId(int param) {
        _marketSummary.setExchangeId(param);
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "iEventId", nullable = false)
    public Event getEvent() {
        return _event;
    }

    public void setEvent(Event event) {
        this._event = event;
    }
}
